package com.example.usercenter.common;

/**
 * 错误码
 *
 * @author REN
 */
public enum ErrorCode {

    SYSTEM_ERROR(50000,"系统内部异常",""),
    SUCCESS(0,"OK",""),
    NO_AUTH(40100, "无权限", ""),
    NOT_LOGIN(40101, "未登录", ""),
    NULL_ERROR(40000, "请求数据为空", ""),
    PARAMS_ERROR(40001, "请求参数错误", "");

    /**
     * 状态码
     */
    private final int code;

    /**
     * 状态码信息
     */
    private final String msg;


    /**
     * 状态码描述
     */
    private final String description;

    ErrorCode(int code, String msg, String description) {
        this.code = code;
        this.msg = msg;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public String getDescription() {
        return description;
    }
}
